<?php


namespace App\Transformers\Wechat;


use League\Fractal\TransformerAbstract;

class WechatKeyTransFormer extends TransformerAbstract
{
    public function transform($data)
    {
    return [
         'id'=>$data->id,
         'reply_id' =>$data->reply_id ?? '',
         'content' =>$data->content ?? '',
         'created_at' => $data->created_at ? $data->created_at->format("Y-m-d H:i:s") : '',
         'updated_at' => $data->updated_at ? $data->updated_at->format("Y-m-d H:i:s") : '',
    ];

    }

}
